<template>
	<view>
		<u-sticky :offset-top="h">
			<view class="p1 mianGg">
				<u-search shape="round" :showAction='false' placeholder="请输入关键词搜索相关内容" @search='getList'
					v-model="keyword"></u-search>
			</view>
		</u-sticky>
		<DaDropdownVue2 :fixedTopValue='h + 44' :dropdownMenu="dropdownMenuList" themeColor="#007aff" textColor="#333333" :duration="300"
			fixedTop @confirm="handleConfirm" @close="handleClose" @open="handleOpen">
		</DaDropdownVue2>
		<scroll-view 
		  scroll-y 
		  @scrolltolower="loadMore"
		  :style="{'height': `calc(100vh - ${upx2px}px)`}"
		  :scroll-with-animation="true">
		  <!-- 内容区域 -->
		  <view v-for="item in 10">
		  	<resume></resume>
		  </view>
		 <Loading :status ='status'></Loading>
			
		</scroll-view>
		

	</view>
</template>

<script>
	// import DaDropdownVue2 from '@/components/da-dropdown-vue2/index.vue'

	import resume from '@/components/common/resume/resume.vue'
	import Loading from '@/components/loading/loading.vue'
	import {
		getNavigationBarHeight,
		getTitleBarHeight
	} from '@/utils/system.js';
	export default {
		name: "position",
		components: {
			// DaDropdownVue2,
			
			resume,
			Loading
		},
		data() {
			return {
				status:'loadmore',
				upx2px:uni.upx2px(400),
				
				
				keyword: '',
				dropdownMenuList: [{
						title: '结算类型',
						type: 'cell',
						prop: 'god1',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					},
					{
						title: '岗位',
						type: 'cell',
						prop: 'god1',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					},
					{
						title: '薪资类型',
						type: 'cell',
						prop: 'god1',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					},
					{
						title: '工作类型',
						type: 'cell',
						prop: 'god1',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					}
				]
			};
		},
		methods: {
			loadMore () {
				console.log('底部触发')
				this.status = 'loading'
			},
			handleConfirm(v) {
				console.log('handleConfirm ==>', v)
			},
			handleClose(v) {
				console.log('handleClose ==>', v)
			},
			handleOpen(v) {
				console.log('handleOpen ==>', v)
			},
			// 查詢崗位
			getList() {
				console.log(this.keyword)
			}

		},
		
		computed: {
			h() {
				return getNavigationBarHeight() + getTitleBarHeight()
			}
		},
		mounted() {


		}

	}
</script>

<style lang="scss">
	.fixed {
		height: 40rpx;
		position: fixed;
		left: 0;
		right: 0;
		// background-color: indianred;
	}
</style>